#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int* printNumbers(int n, int* returnSize)
{
    int i = 0;
    *returnSize = pow(10, n) - 1;
    int* arr = (int*)malloc(*returnSize * sizeof(int));
    for (i = 0;i < *returnSize;i++)
    {
        arr[i] = i + 1;
    }
    return arr;
}
int main()
{
	int n = 0;
	int size = 0;
    int *p;
	scanf("%d", &n);
   p= printNumbers(n, &size);
   for (int i = 0;i < pow(10, n) - 1;i++)
   {
       printf("%d ", *(p + i));
   }
	return 0;
}